<?
require 'sys_cookie.php';
require 'ctf.php';
require_once 'sys_basic.php';
$user_key=cookie_("userkey");
$user_guid=cookie_("userid");
$user_index=(int)get_("index");
//echo get_data(get_("index"),0);
if($user_key=="" or $user_guid=="")
{
	game_set("0",guid());//重新签发cookies 其实没用 就是躲过上个判断
    load_html('function load(){$.ajax({url: window.location.href,success: function(data) {document.write(data);}});}');
	exit;//退出本次
}
if(game_check($user_key,$user_guid,$user_index)){
    index_html($user_index);
	exit;
}else{
	$tmp=(int)game_get($user_key,$user_guid);//用户最高进度
	header("Location:index.php?index=".(string)$tmp);
	exit;
}

